package com.sfjswl.fp.core.leaf.roam;

import com.sfjswl.fp.core.context.RulePack;
import com.sfjswl.fp.core.context.RuleRoam;
import com.sfjswl.fp.core.leaf.pack.BaseLeafPackResult;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public abstract class BaseLeafRoamResult extends BaseLeafPackResult {

    @Override
    protected boolean doPackResult(RulePack pack) {
        return doRoamResult(pack.getRoam());
    }

    /*
     * process leaf result with roam
     */
    protected abstract boolean doRoamResult(RuleRoam roam);
}
